STATEMENT INVOKING ONE-WAY TRANSFER OF PROGRAM CONTROL IN MANY LANGUAGES
Go to; GOTO Considered Harmful; Go To Statement Considered Harmful; Computed goto; Goto statement; Goto considered harmful; A Case against the GO TO Statement; GO TO; Label Value Operator; Considered Harmful; Label value operator; GOTO; Label referece operator; Label reference operator; Goto (command); Computed GOTO; Jump to; JUMP TO; GOTO (DOS command); Go To; Computed GOTO and Assigned GOTO; Language support for GOTO statements
<programming> (Or "GOTO", "go to", "GO TO", "JUMP", "JMP") A
construct and keyword found in several higher-level
programming languages (e.g. Fortran, COBOL, BASIC, C)
to cause an unconditional jump or transfer of control from
one point in a program to another. The destination of the
jump is usually indicated by a label following the GOTO
keyword.
In some languages, a label is a line number, in which case
every statement may be labelled, in others a label is an
optional alphanumeric identifier.
Use of the GOTO instruction in high level language
programming fell into disrepute with the development and
general acceptance of structured programming, and especially
following the famous article "GOTO statement {considered
harmful}". Since a GOTO is effectively an assignment to the
program counter, it is tempting to make the generalisation
"assignment considered harmful" and indeed, this is the basis
of functional programming.
Nearly(?) all machine languageinstruction sets include a
GOTO instruction, though in this context it is usually called
branch or jump or some mnemonic based on these.
See also COME FROM.
(2000-12-13)
Goto
STATEMENT INVOKING ONE-WAY TRANSFER OF PROGRAM CONTROL IN MANY LANGUAGES
Go to; GOTO Considered Harmful; Go To Statement Considered Harmful; Computed goto; Goto statement; Goto considered harmful; A Case against the GO TO Statement; GO TO; Label Value Operator; Considered Harmful; Label value operator; GOTO; Label referece operator; Label reference operator; Goto (command); Computed GOTO; Jump to; JUMP TO; GOTO (DOS command); Go To; Computed GOTO and Assigned GOTO; Language support for GOTO statements
GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function call normally returns control.